# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer:
pkgname=iverilog
_pkgver=11_0
pkgver=${_pkgver%%_*}.${_pkgver##*_}
pkgrel=0
pkgdesc="Icarus Verilog compiler and simulation tool"
url="http://iverilog.icarus.com"
arch="all"
license="GPL-2.0-or-later"
makedepends="automake autoconf gperf bison flex"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/steveicarus/iverilog/archive/v$_pkgver.tar.gz
	autoconf-2.70.patch"
builddir="$srcdir/$pkgname-$_pkgver"

prepare() {
	default_prepare
	update_config_guess
	update_config_sub
	aclocal && autoconf
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5d6a65e1c3b6b62e99af708cd5a259cc69c6b789dd6eff69e225903d9b8c115d9e5d6f7635b30c6558197cd0ee6fd8196a163fbd98956e24c211d97328b85056  iverilog-11.0.tar.gz
1a57dfd29799ff2aeeb27632325b9522b9764faaecf223ff7120bf224ebae8cda2beffb5f2b04bfc148e518332680272cc32491e0bcd103c2d0dffd46a37aa0e  autoconf-2.70.patch
"
